<template>
<div class="content">
    <mt-header fixed title="站点详情">
              <div slot="left">
    <mt-button icon="back" @click.native="goback()">返回</mt-button>
              </div>
    </mt-header>
    <mt-cell title="站点名称" :value="result.sitename" v-show="result.sitename"></mt-cell>
    <mt-cell title="建筑名称" :value="result.buidname" v-show="result.buidname"></mt-cell>
    <mt-cell title="监管单位名称" :value="result.Suervisorname" v-show="result.Suervisorname"></mt-cell>
    <mt-cell title="维保单位名称" :value="result.maintainname" v-show="result.maintainname"></mt-cell>
    <mt-cell title="业主名称" :value="result.Proprietorname" v-show="result.Proprietorname"></mt-cell>
    <mt-cell title="业主电话" :value="result.phone" v-show="result.phone"></mt-cell>
    <mt-cell title="详细地址" :value="result.address" v-show="result.address"></mt-cell>
    <mt-cell title="经度" :value="result.longitude" v-show="result.longitude"></mt-cell>
     <mt-cell title="纬度" :value="result.latitude" v-show="result.latitude"></mt-cell>
    <mt-cell title="高度" :value="result.levation" v-show="result.levation"></mt-cell>
    <div class="img-div" v-show="result.siteimageurl">
       <p>站点图片</p>
        <img :src="result.siteimageurl"/>
    </div>
    <div class="img-div" v-show="result.buildimageurl">
       <p>建筑正面图片</p>
        <img :src="result.buildimageurl"/>
    </div>
    </div>
</template>
<script>
export default {
  data () {
    return {
      result: {}
    }
  },
  created () {
    this.getdevicedetail()
  },
  methods: {
    async getdevicedetail () {
      const res = await this.$store.dispatch('sitedetail', {
        siteid: this.$route.query.siteid
      })
      if (res.status === '0') {
        this.result = res.context
        console.log(res)
      }
    },
    goback () {
      this.$router.go(-1)
    }
  }

}
</script>
<style lang="less" scoped>
.content{
    padding-top: 40px;
}
.img-div{
    padding: 10px;
    font-size: 18px;
    img{
        width: 100%;
    }
}
</style>
